-
Notifications
You must be signed in to change notification settings - Fork 47
Correct indexing of cospOUT #86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…sat_bugfix Pull updates to CI tests.
…sat_bugfix Merge from CFMIP master COSP2.0.
|
Hi @alejandrobodas, I think that I merged in the latest changes. But it looks like the integration failed again. If I am doing something incorrectly just let me know. Happy to continue pulling in from the latest changes. |
|
@jshaw35 I think we should expect some answer changes here. |
|
Hi @jshaw35 . Yes, the tests will fail because your changes modify the results. This makes the review of this change a bit complex, despite the simplicity of the code changes. We will guide you through the process. Basically, this is done in two steps:
Please can you add to this PR plots of the diagnostics that have changed? In order to do this, you'll need to download and unpack the outputs generated by one of the compilers, e.g. outputs.gfortran-12.UKMO.tgz. You'll find the files at the bottom of the failed tests: The files contain plots of the outputs that have been generated automatically by the integration tests, but unfortunately they don't contain plots of the variables that are affected by this PR, so you'll need to produce the plots offline. It is sufficient to add plots from the outputs of gfortran-12 only.
I hope this helps. Please let us know if you need more information and thanks for contributing to COSP! |
|
Hi @alejandrobodas, I've finally gotten around to producing the plots of the diagnostics that changed. I updated plot_test_outputs.py, so plots of the missing variables should now be produced during CI (here I've assumed some bounds on the CFODD_NDBZE and CFODD_NICOD axes). The updated plots after the recent failed CI are here: I don't actually use the diagnostic fields that were affected by the indexing error, so I will leave interpretation of the updated plots to you. Just reviewing them, however, I noticed that the histograms for the ncfodd1,2,3 variables almost always have in-cloud optical depth values in the 0-2 bin. Best, |
Sorry for the late response. I missed the PR notification. |
|
This PR has been stalled for a while. The code changes look fine, but as @jshaw35 mentions above the plots of the fields affected by the indexing don't look right to me. @takmichibata please can you have a look at the plots attached? |
|
Thank you for sharing the plots @alejandrobodas @jshaw35. |
|
@alejandrobodas @takmichibata @dustinswales Best, |
|
@alejandrobodas @dustinswales @jshaw35 |
|
@jshaw35 Can you sync this branch with master? |
|
@dustinswales I don't think I have permissions to merge the changes. I don't see any options to merge from my side. I just merged with the master, is that what you were asking for? |
Merging bug fixes back into the CFMIP master branch.
…into cloudsat_bugfix Catching up with origin.
|
@jshaw35 That's it. Thanks! |
|
@dustinswales is there anything left to do here to pull these changes in and update the kgos? |
|
@jshaw35 The code is good to go, so I think just updating the KGOs and the md5 files (https://github.com/CFMIP/COSPv2.0/blob/master/contributing.md#code-review) @alejandrobodas How should Jonah provide new KGOs? |
|
Hi @jshaw35 . I've just merged a pull request, please can you sync with master? I'll then upload the new KGOs to Gdrive and share with you their URLs so that you can update the scripts that downloads the KGOs. |
|
@alejandrobodas I think things should be ready to go now! |
@alejandrobodas I'm taking a look right now. |
|
@alejandrobodas @jshaw35 I was able to trace back the reproducibility issue to quickbeam.F90. The Cloudsat precipitation occurrence diagnostics are only computed when I added a step to initialize these diagnostics and it seems to have solved the problem. But... if these diagnostics are to only be used when use_vgrid=.true., we should turn them off in the cosp_output namelist for the UM "model_levels" test, and remove these fields from the KGOs? For extra safety, I added a guard to the offline driver to not request these diagnostics from COSP when |
|
@dustinswales thanks for looking into this. I agree that we should turn those diagnostics off in the namelist and delete them from the KGO. The changes in the branch csat_precip_mlev_off do that. I've integrated your changes into that branch. I could initiate a PR with those changes and, once those changes are merged then we could proceed with updating the KGOs from this PR. |
|
@alejandrobodas Sounds good to me. |
|
@jshaw35 please can you sync your branch with the master branch? Hopefully, we're nearly there! |
|
@alejandrobodas I have merged the changes but I may have reverted some of the diagnostics changes accidentally. Let me know how to proceed. |
|
@jshaw35 Do you want to undo the changes of a particular commit? You can do that with |
|
@alejandrobodas I think I manually reverted those changes in the last commit 77ee04e |
|
@alejandrobodas pinging this again |
|
@jshaw35 sorry, I'm away with access only from my mobile. I'll replace the KGOs next week when I'm back to work. |
|
@jshaw35 I've uploaded the new gfortran KGOs to GDrive. Please can you move to v006 by picking up the changes in the branch |
|
@alejandrobodas sorry for the long delay, I was also away from work last week. I merged with the KGOs_5_6 branch but there still seem to be some differences KGOs_5_6...jshaw35:COSPv2.0:cloudsat_bugfix |
|
@jshaw35 the tests are failing because there is a mismatch in the KGO versions for the gfortran compilers. Please use v006 in |
|
Success!! The integration tests have now passed. This looks good to me. @dustinswales are you happy for me to go ahead and merge? |
dustinswales
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alejandrobodas Five green check marks is a beautiful thing.
|
Changes merged. This has been a small but challenging change. |
|
@alejandrobodas and @dustinswales thank you for your support and patience! One last request, can you create a new tag for this version of the model? CESM would like to incorporate this version of COSP and update the CAM driver before incorporating COSP-RTTOV and their procedures require a tagged versio. |
|
@jshaw35 Here you go, https://github.com/CFMIP/COSPv2.0/releases/tag/v2.1.8. |

















Hi all,
The cospOUT DDT seems to be missing correct indexing for when inputs are chunked in the CloudSat quickbeam_column call (lines 1272-1277) and the cosp_diag_warmrain call (lines 1640-1670). I have corrected the indexing errors.
@dustinswales mentioned that there might be an issue in how the MODIS diagnostics are passed to the warm rain diagnostics. I think that adding the (ij:ik) indexing when passing cospOUT fields to cosp_diag_warm as inputs should align the other warm rain diagnostic inputs with cospOUT and fix things.
A simple test using the COSP offline driver showed changes relative to the KGO values when chunking is used. This is expected. There should be no changes when there is no chunking in calls to COSP_SIMULATOR.
Best,
Jonah